<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script language="javascript" type="text/javascript" src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/jquery.js"></script>
<script src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/frame.js" language="javascript" type="text/javascript"></script>
<link href="http://www.ucmaim.com/Public/Ucmaim/Admin/css/style.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
<script src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/DD_belatedPNG.js" language="javascript" type="text/javascript"></script>
<script>
  DD_belatedPNG.fix('.nav ul li a,.top_link ul li,background');   /* string argument can be any CSS selector */
</script>
<![endif]-->
</head>
<body class="showmenu">
<script src="http://www.ucmaim.com/Public/Ucmaim/Home/Js/common.js" type="text/javascript"></script>
<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
    <tr>
        <td height="31"><div class="titlebt">内容列表</div></td>
    </tr>
</table>

<div class="main">
    <div class="operate">
        <div class="left">
            <?php if(!empty($issort)): ?><input type="button" class="btn_blue" onclick="form_do.submit();" value="更新排序"><?php endif; ?>
            <input type="button" onclick="window.open('<?php echo U('Admin/Content/AddContent');?>','main')" target="main" class="btn_blue" value="添加">
        </div>
        <div class="left_pad">
            <form id="search" method="get" action="<?php echo U('Admin/Content/Content');?>">
                标题：<input type="text" name="keyword" title="关键字" class="inp_default" value="<?php echo ($keyword); ?>">&nbsp;
                <!-- 分类筛选 -->
                栏目筛选：
                <select id="select" name="category">
                        <option value="0" selected>全部</option>
                    <?php if(is_array($category)): $i = 0; $__LIST__ = $category;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v["id"]); ?>" <?php echo ($v["selected"]); ?>><?php echo ($v["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
                <input type="submit" class="btn_blue" value="查  询">
            </form>
        </div>
    </div>
    <div class="list">
        <form action="<?php echo U('News/Lists', 'do=sort');?>" method="post" id="form_do" name="form_do">
            <table width="100%">
                <tr>
                    <th>编号</th>
                    <th>标题</th>
                    <th>所属栏目</th>
                    <th>发布时间</th>
                    <th>修改时间</th>
                    <th>操作</th>
                </tr>

                <?php if(empty($list)): ?><tr><td colspan="9">本区域暂无数据显示...</td></tr>
                    <?php else: ?>
                    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr>
                            <td><?php echo ($v["id"]); ?></td>
                            <td>
                                <a href="<?php echo ($v["news_link"]); ?>" target="_blank" ><?php echo ($v["title"]); ?></a>
                            </td>
                            <td><?php echo ($v["category_name"]); ?></td>
                            <td><?php echo (date('Y-m-d H:i:s', $v["create_time"])); ?></td>
                            <td><?php echo (date('Y-m-d H:i:s', $v["update_time"])); ?></td>
                            <td>
                                <a href="<?php echo U('Admin/Content/EditContent', array('id' => $v['id']));?>">编辑</a>
                                <a href="<?php echo U('Admin/Content/DeleteContent', array('id' => $v['id']));?>" class="delete-one">删除</a>
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; endif; ?>

            </table>
        </form>
    </div>
    <div class="page">
        <?php echo ($page); ?>
    </div>
</div>

<script type="text/javascript">
    $('.delete-one').click(function(){
        if( ! window.confirm('确定要删除此内容吗？') ){
            return false;
        }
    });
</script>
</body>
</html>